#ifndef __HUD__
#define __HUD__

#include <allegro.h>

#include "sprite.h"

/*! \brief HUD class handler.
*
* (stands for Head-Up Display).
*/
class HUD : public Sprite {
  public:
    /*! \brief Class constructor.
    *
    * \param w integer, width of the HUD
    * \param h integer, height of the HUD
    */
    HUD(int w, int h);
    /*! \brief Class destructor.
    *
    */
    ~HUD();
    /*! \brief generate the complete sprite.
    *
    */
    void __update();
    /*! \brief Destroy an element.
    * \param id integer, Element ID
    * \param force_destroy  default: 0, remove the bitmap if set to 1
    */
    void __deleteId(int id, int force_destroy = 0);
    /*! \brief horizontally stretch an element.
    *
    * \param eId integer, Element ID
    * \param size integer
    */
    void __setStretchX(int eId, int size);

    /**
    * Background bitmap.
    */
    BITMAP * _background;
    /**
    * element Array.
    * Elements are Sprite class objects.
    */
    Sprite * _elementArr[8];
    /**
    * integer Array.
    * Custom value linked to elements.
    */
    int _idArr[8];
    /**
    * integer array.
    * if set to 1, the related element won't be displayed on next call to __update()/
    */
    int _hideArr[8];  
    
    private:
      int _stretchXArr[8];
};
#endif
